home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / New System Software Extensions / QuickDraw™ GX 1.1.2 / Programming Stuff / QuickDraw™ GX Libraries / Graphics libraries / picture library.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-10  |  1.3 KB  |  37 lines  |  [TEXT/MPS ]

  1. /* graphics libraries:
  2.     picture library
  3.     by Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
  4.     Copyright 1987 - 1991 Apple Computer, Inc.  All rights reserved.    */
  5.  
  6. #include "graphics libraries.h"
  7. #include "math routines.h"
  8.  
  9.  
  10. void AddToPicture(gxShape picture, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform)
  11. {
  12.     GXSetPictureParts(picture, 0, 0, 1, &newShape, &newStyle, &newInk, &newTransform);
  13. }
  14.  
  15. void InsertPictureItem(gxShape picture, long index, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform)
  16. {
  17.     GXSetPictureParts(picture, index, 0, 1, &newShape, &newStyle, &newInk, &newTransform);
  18. }
  19.  
  20. gxShape GetPictureItem(gxShape picture, long index, gxShape *destShape, gxStyle *destStyle, gxInk *destInk, gxTransform *destTransform)
  21. {
  22.     gxShape tempShape;
  23.  
  24.     if( destShape == nil )
  25.         destShape = &tempShape;
  26.  
  27.     if( GXGetPictureParts(picture, index, 1, destShape, destStyle, destInk, destTransform) )
  28.         return *destShape;
  29.  
  30.     return nil;
  31. }
  32.  
  33. void SetPictureItem(gxShape picture, long index, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform)
  34. {
  35.     GXSetPictureParts(picture, index, 1, 1, &newShape, &newStyle, &newInk, &newTransform);
  36. }
  37.